Documentation for class button

Inherits from 	button_object 

Properties declared in button 
	alternative_image 
	alternative_title 
	image 
	image_position 
	key_equivalent 
	title_alignment 
	type 
	value 

Class Methods declared in button 
	new 

Methods declared in button 
	action 
		perform_click 
		size_to_fit 
		size_to_hold 
		take_boolean_value_from(object) 
	any 
		alternative_image 
		alternative_title 
		boolean_value 
		image 
		image_position 
		key_equivalent 
		perform_click 
		set_alternative_image(image) 
		set_alternative_title(string) 
		set_image(image) 
		set_image_position(symbol) 
		set_key_equivalent(character) 
		set_title_alignment(symbol) 
		set_type(type) 
		set_value(boolean) 
		size_to_fit 
		size_to_hold 
		take_boolean_value_from(object) 
		title_alignment 
		type 
		value 
	get 
		alternative_image 
		alternative_title 
		image 
		image_position 
		key_equivalent 
		title_alignment 
		type 
		value 
	set 
		set_alternative_image(image) 
		set_alternative_title(string) 
		set_image(image) 
		set_image_position(symbol) 
		set_key_equivalent(character) 
		set_title_alignment(symbol) 
		set_type(symbol) 
		set_value(boolean) 

Class 
#begin_class
button 
The class button is a subclass of the class button_object. 
Button are controllers that the user clicks on to make things happen.
A button may have a title and an image and may respond to user interaction in many different ways.
#end_class

Properties 

#begin_property
alternative_image 
Stores a reference to the image that is used by the button as the alternative image. For example if the type of the button is #momentary_change and it is clicked on by the mouse the alternative image will be shown.
The default value is nil.
#end_property

#begin_property
alternative_title 
Stores string that is used by the button as the alternative title. For example if the type of the button is #momentary_change and it is clicked on by the mouse the alternative title will be shown.
The default value is nil.
#end_property

#begin_property
image 
Stores a reference to the image that is shown in the button.
The default value is nil.
#end_property

#begin_property
image_position 
Stores a symbol that specifies how the image and the title of the button should be displayed.
The different image positions are:
#title_only - only the title of the button is displayed
#image_only - only the image of the button is displayed
#image_left - the image is placed to the left of the title
#image_right - the image is placed to the right of the title
#image_below - the image is placed below the title
#image_above - the image is placed above the title
#image_overlaps - the image and the title overlaps
The default value is #text_only.
#end_property

#begin_property
key_equivalent 
Stores a character that can be used as the key equivalent of the button. The default value is nil.
Note: Key equivalents does only work when the button is in a panel.
#end_property

#begin_property
title_alignment 
Stores the text alignment for the title of the button. 
The different alignments are:
#left_aligned
#right_aligned
#centered
#end_property

#begin_property
type 
Stores a symbol that specifies how the button should behave when it is clicked.
The different types are:
#momentary_push- Highlighting is shown by the button's "pushing in" to the screen.
#momentary_change - When the button is highlighted the alternative image or alternative title will be displayed.
#push_on_push_off - The value true differs from the value false by the fact that different colors are used. Highlighting is achieved by "pushing in".
#toggle - The value true uses the alternative image and/or the alternative title. Highlighting is performed by "pushing in".
The default value is #momentary_push.
#end_property

#begin_property
value 
Stores a boolean value that represents the "state" of the button. 
If the value is true the button in "on".
If the value is false the button in "off".
The default value is false.
#end_property

Methods 

#begin_method
alternative_image 
Returns the alternative_image property of the button.
#end_method

#begin_method
alternative_title 
Returns the alternative_title property of the button.
#end_method

#begin_method
boolean_value 
Returns the value of the button (true or false).
#end_method

#begin_method
image 
Returns the image property of the button.
#end_method

#begin_method
image_position 
Returns the image_position property of the button.
#end_method

#begin_method
key_equivalent 
Returns the key_equivalent property of the button.
#end_method

#begin_method
perform_click 
Simulates a mouse-click on the button.
Returns self.
#end_method

#begin_method
set_alternative_image(image) 
Sets the alternative_image property to alternative_image.
Returns self.
#end_method

#begin_method
set_alternative_title(string) 
Sets the alternative_title property to alternative_title.
Returns self.
#end_method

#begin_method
set_image(image) 
Sets the image property to image.
Returns self.
#end_method

#begin_method
set_image_position(symbol) 
Sets the image_position property to image_position.
The different image positions are:
#title_only - only the title of the button is displayed
#image_only - only the image of the button is displayed
#image_left - the image is placed to the left of the title
#image_right - the image is placed to the right of the title
#image_below - the image is placed below the title
#image_above - the image is placed above the title
#image_overlaps - the image and the title overlaps
Returns self.
#end_method

#begin_method
set_key_equivalent(character) 
Sets the key_equivalent property to key_equivalent.
Returns self.
#end_method

#begin_method
set_title_alignment(symbol) 
Sets the title_alignment property to symbol.
The different alignments are:
#left_aligned
#right_aligned
#centered
Returns self.
#end_method

#begin_method
set_type(type) 
Sets the type property to type.
The different types are:
#momentary_push- Highlighting is shown by the button's "pushing in" to the screen.
#momentary_change - When the button is highlighted the alternative image or alternative title will be displayed.
#push_on_push_off - The value true differs from the value false by the fact that different colors are used. Highlighting is achieved by "pushing in".
#toggle - The value true uses the alternative image and/or the alternative title. Highlighting is performed by "pushing in".
#switch - A variant of #toggle which has no border, and which has a default image called {image switch}.
#radio - A variant of #toggle which has no border, and which has a default image called {image radio}.
Returns self.
#end_method

#begin_method
set_value(boolean) 
Sets the value property to boolean.
Returns self.
#end_method

#begin_method
size_to_fit 
Resizes the button to exactly fit its title and image.
Returns self.
#end_method

#begin_method
size_to_hold 
Resizes the button so that it at least fits its title and image.
Returns self.
#end_method

#begin_method
take_boolean_value_from(object) 
Sets the value of the button to the boolean value of object.
Returns self.
#end_method

#begin_method
title_alignment 
Returns the title_alignment property of the button.
#end_method

#begin_method
type 
Returns the type property of the button.
#end_method

#begin_method
value 
Returns the value property of the button.
#end_method

Class Methods 

#begin_class_method
new 
Returns a new button.
Ex:
{button}:new
#end_class_method